import { app, BrowserWindow } from "electron";
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true;
const createWindow = () => {
  const mainWindow = new BrowserWindow({
    width: 1200,
    height: 700,
    autoHideMenuBar: true
  });
  mainWindow.loadURL("http://localhost:3000");
  mainWindow.webContents.openDevTools();
};
app.whenReady().then(() => {
  createWindow();
  app.on("activate", () => {
    if (BrowserWindow.getAllWindows().length === 0)
      createWindow();
  });
});
app.on("window-all-closed", () => {
  if (process.platform !== "darwin")
    app.quit();
});
